package com.Smallchangesys.prove.aaa;


public class Test{

    public static void main(String[] args){

        System.out.println("ni hao");
        System.out.println(Animals.animal1.toString());
    }
}


enum Animals{
    //名称(对象)
    animal1("老虎",4);

    private String name;
    private int numbers;


    Animals(String name, int numbers) {
        this.name = name;
        this.numbers = numbers;

    }


    public String toString(){
        return name + "  has  " + numbers + "  legs  ";
    }

}